package com.wksc.workflow.service;

import com.wksc.workflow.dao.UsersDao;
import com.wksc.workflow.model.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Description:
 * Author: Zero
 * CreateTime: 2013-12-23 14:47
 */
@Service
public class UsersService {
    @Autowired
    private UsersDao usersDao;

    /**
     * 用户登录
     *
     * @param userName 用户名
     * @param pwd      密码
     * @return true：成功，false：失败
     */
    public boolean login(String userName, String pwd) {
        Users user = usersDao.login(userName);
        return null != user && user.getPassword().equals(pwd);
    }
}
